package com.mycompany.user.entity;

import java.io.Serializable;
import java.rmi.server.ServerNotActiveException;
import java.util.Date;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.stereotype.Component;

@Component
@Document
public class User implements Serializable{
	
	private static final long serialVersionUID = -3991536273251143765L;

	private Integer userId;

	//角色id，普通用户的是3,单位用户是2,管理员是1
	private Integer roleId;

	private String userName;

	private String password;

	private String delFlag;

	private Date updateTime;

	private Date createTime;

	private String description;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public String toString() {
		return "User{" +
				"userId=" + userId +
				", roleId=" + roleId +
				", userName='" + userName + '\'' +
				", password='" + password + '\'' +
				", delFlag=" + delFlag +
				", updateTime=" + updateTime +
				", createTime=" + createTime +
				", description='" + description + '\'' +
				'}';
	}
}
